package com.lovenote.common.service;

import java.util.List;

import com.base.common.service.IBaseService;
import com.lovenote.common.pojo.NoteCatalog;

public interface INoteCatalogService extends IBaseService<NoteCatalog, Integer> {

	/**
	 * return true if the note catalog name is unique
	 * @param userId
	 * @param name
	 * @return
	 */
	public boolean isNameUnique(long userId, String name);
	
	/**
	 * Return note catalog list by user id
	 * @param userId
	 * @return return note catalog list by user id
	 */
	public List<NoteCatalog> getNoteCatalogList (long userId);
	
	/**
	 * Delete catalog by user id and catalog id, verify if the catalog belongs the user
	 * @param userId
	 * @param catalogId
	 * @return true if user has this catalog, otherwise false
	 */
	public boolean deleteCatalog(long userId, int catalogId);
}
